TextView: Fix gesture coords with :border-width >0
authorDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 20:56:06 +0000 (21:56 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 21:28:49 +0000 (22:28 +0100)
commitbd7c87c762c75bbb8dfb5fed23964651188ef206
tree2d8b6d30546d9ddb97b4fda651e029d14b4c623c
parent25abbfdcf6b2b7cc42be16c8c3e9fef55030e9fa
TextView: Fix gesture coords with :border-width >0

Container:border-width caused the x/y coords converted to iters to be
offset inwards by that width, breaking positioning/selecting by gesture.

So, subtract :border-width in widget_to_text_window_coords(). This fixes
gesture positions, & plays fine with :margin & CSS margin/border/padding

N.B.: This is not to endorse :border-width. It’s gone in GTK+ 4 & weird
on a TextView: it’d be more intuitive to – if you must! – set it on the
TV parent. Really, please just use CSS instead. Still, it’s easy to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=759725
gtk/gtktextview.c